import { get, post } from "../request";
import { PatientResponse } from "./patient.d";

export const patientList = (pageParam: any) => {
    return get<PatientResponse>('/activity/query', pageParam);
}
// 删除患教活动
export const deleteActivity = (id: number) => {
    return post(`/activity/deleteActivity/${id}`, {});
}

//新增患教活动
export const addActivity = (activity: any) => {
    return post('/activity/add', activity);
}
//修改患教活动
export const updateActivity = (activity: any) => {
    return post('/activity/update', activity);
}

//根据id查询患教活动
export const getActivityById = (id: number) => {
    return get<PatientResponse>(`/activity/get/${id}`);
}

//查询所有患教活动的参与人员
export const getActivityUser = (id: number) => {
    return get(`/signup/list/${id}`);
}
